﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Volo.Abp.Domain.Entities.Auditing;

namespace Acme.BookStore.Purchase.Customergoods
{
    public class CustomergoodsModel:AuditedAggregateRoot<Guid>
    {
        /// <summary>
        /// 进货通知单号（唯一标识）
        /// </summary>
        public string? PurchaseOrderNo { get; set; }
        /// <summary>
        /// 供应商编码
        /// </summary>
        public string? SupplierCode { get; set; }
        /// <summary>
        /// 车号
        /// </summary>
        public string? CarNo { get; set; }
        /// <summary>
        /// 司机
        /// </summary>
        public string? DriverName { get; set; }
        /// <summary>
        /// 司机电话
        /// </summary>
        public string? DriverPhone { get; set; }
        /// <summary>
        /// 单据状态
        /// </summary>
        public string? Status { get; set; }
        /// <summary>
        /// 货主（可关联货主字典表，这里简单存名称或关联 ID ，根据实际业务调整）
        /// </summary>
        public string Shipper { get; set; }
        /// <summary>
        /// 预计到货时间
        /// </summary>
        public DateTime? EstimatedArrivalTime { get; set; }
        /// <summary>
        /// 客户订单号（必填，用于对账、溯源）
        /// </summary>
        public string? CustomerOrderNo { get; set; }
        /// <summary>
        /// 运输号码（物流单号等，用于跟踪运输状态 ）
        /// </summary>
        public string? TransportNo { get; set; }
        /// <summary>
        /// 运输公司名称
        /// </summary>
        public string? TransportCompany { get; set; }
        /// <summary>
        /// 供应商名称（可关联供应商表 ）
        /// </summary>
        public string? Supplier { get; set; }
        /// <summary>
        /// 预约库区（如 A 区、冷链区，可关联库区配置表 ）
        /// </summary>
        public ReservedWarehouseAreaModel? ReservedWarehouseArea { get; set; }
        /// <summary>
        /// 仓库名称（关联仓库信息表 ）
        /// </summary>
        public WarehouseModel? Warehouse { get; set; }
        /// <summary>
        /// 订单类型（枚举值，1 代表入库通知等，可扩展 ）
        /// 这里简单用 int ，实际建议用枚举类型或单独字典表 
        /// </summary>
        public OrderTypeModel? OrderType { get; set; }
        /// <summary>
        /// 备注信息
        /// </summary>
        public string? Remarks { get; set; }
        /// <summary>
        /// 附件存储路径（关联文件服务器路径 ）
        /// </summary>
        public string? AttachmentPath { get; set; }

        protected CustomergoodsModel() { }

        public CustomergoodsModel
        (Guid id,string? purchaseOrderNo, string? supplierCode, string? carNo, string? driverName, string? driverPhone, string? status, string shipper, DateTime? estimatedArrivalTime, string? customerOrderNo, string? transportNo, string? transportCompany, string? supplier, ReservedWarehouseAreaModel? reservedWarehouseArea, WarehouseModel? warehouse, OrderTypeModel? orderType, string? remarks, string? attachmentPath):base(id)
        {
            PurchaseOrderNo = purchaseOrderNo;
            SupplierCode = supplierCode;
            CarNo = carNo;
            DriverName = driverName;
            DriverPhone = driverPhone;
            Status = status;
            Shipper = shipper;
            EstimatedArrivalTime = estimatedArrivalTime;
            CustomerOrderNo = customerOrderNo;
            TransportNo = transportNo;
            TransportCompany = transportCompany;
            Supplier = supplier;
            ReservedWarehouseArea = reservedWarehouseArea;
            Warehouse = warehouse;
            OrderType = orderType;
            Remarks = remarks;
            AttachmentPath = attachmentPath;
        }
    }
}
